<ion-header>
  <ion-toolbar>
    <ion-buttons slot="start">
      <ion-icon name="arrow-back" size="large" (click)="back()"></ion-icon>
    </ion-buttons>
    <ion-title>选择小区</ion-title>
  </ion-toolbar>
</ion-header>

<ion-content class="background-color">
  <ion-input placeholder="请输入小区名称" [(ngModel)]="name"
             (ionChange)="select()"></ion-input>
  <img src="assets/images/status/search.svg" alt="" class="search" (click)="select()">

  <div class="place">
    <div *ngFor="let item of addressList; let i = index">
      <ion-item *ngIf="i != addressList.length-1" (click)="selectAddress(item)">
        <ion-row>
          <ion-col size="12" class="community">{{item.name}}</ion-col>
          <ion-col size="12" class="area">{{item.address}}</ion-col>
        </ion-row>
      </ion-item>
      <ion-item *ngIf="i == addressList.length-1" lines="none" (click)="selectAddress(item)">
        <ion-row>
          <ion-col size="12" class="community">{{item.name}}</ion-col>
          <ion-col size="12" class="area">{{item.address}}</ion-col>
        </ion-row>
      </ion-item>
    </div>
  </div>
</ion-content>
